//
// Created by Administrator on 2016/11/29.
//

#include "DirectionalLight.h"

using namespace glm;
using namespace ZainGL;

DirectionalLight::DirectionalLight() {
    mAmbient=0.6f;
    mColor=vec4(1);
    setPosition(vec3(0, 0.9f, 0.1f));
}

glm::mat4 DirectionalLight::getProjection(GLfloat d, GLfloat d1) {
    return ortho(-800 / 2.0f, 800 / 2.0f, 600 / 2.0f, -600 / 2.0f, -1024.0f, 1024.0f);
}

mat4 DirectionalLight::getViewMatrix() {
    return lookAt(getPosition(), vec3(0), WORLD_UP);
}
